#include "PlayerController.h"
#include "PlayerKinectController.h"

void PlayerKinectController::Initialization()
{
	m_playerModel->setBoneDataMode(BONE_KINECT);
}

PlayerKinectController::PlayerKinectController( Ogre::SceneManager *sm ):PlayerController(sm)
{
	Initialization();
}

void PlayerKinectController::AddTime( Ogre::Real deltaTime )
{
	getPlayerModel()->suppress = Kinect::getSingleton().suppress;
	getPlayerModel()->m_front = Kinect::getSingleton().m_front;
	getPlayerModel()->m_origTorsoPos = Kinect::getSingleton().TorsoPos;
	getPlayerModel()->m_SmoothingDelta = Kinect::getSingleton().m_SmoothingDelta;
	getPlayerModel()->m_SmoothingFactor = Kinect::getSingleton().m_SmoothingFactor;
	if(Kinect::getSingleton().isLost)
	{
		getPlayerModel()->resetBonesToInitialState();
	}
	getPlayerModel()->AddTime(deltaTime);
	getPlayerModel()->setBoneData();
}